package com.qpkj.oms.service.impl;

import java.util.List;
import com.qpkj.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qpkj.oms.mapper.OmsComplementRecordMapper;
import com.qpkj.oms.domain.OmsComplementRecord;
import com.qpkj.oms.service.IOmsComplementRecordService;

/**
 * 补数记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-18
 */
@Service
public class OmsComplementRecordServiceImpl implements IOmsComplementRecordService 
{
    @Autowired
    private OmsComplementRecordMapper omsComplementRecordMapper;

    /**
     * 查询补数记录
     * 
     * @param id 补数记录主键
     * @return 补数记录
     */
    @Override
    public OmsComplementRecord selectOmsComplementRecordById(Long id)
    {
        return omsComplementRecordMapper.selectOmsComplementRecordById(id);
    }

    /**
     * 查询补数记录列表
     * 
     * @param omsComplementRecord 补数记录
     * @return 补数记录
     */
    @Override
    public List<OmsComplementRecord> selectOmsComplementRecordList(OmsComplementRecord omsComplementRecord)
    {
        return omsComplementRecordMapper.selectOmsComplementRecordList(omsComplementRecord);
    }

    /**
     * 新增补数记录
     * 
     * @param omsComplementRecord 补数记录
     * @return 结果
     */
    @Override
    public int insertOmsComplementRecord(OmsComplementRecord omsComplementRecord)
    {
        omsComplementRecord.setCreateTime(DateUtils.getNowDate());
        return omsComplementRecordMapper.insertOmsComplementRecord(omsComplementRecord);
    }

    /**
     * 修改补数记录
     * 
     * @param omsComplementRecord 补数记录
     * @return 结果
     */
    @Override
    public int updateOmsComplementRecord(OmsComplementRecord omsComplementRecord)
    {
        omsComplementRecord.setUpdateTime(DateUtils.getNowDate());
        return omsComplementRecordMapper.updateOmsComplementRecord(omsComplementRecord);
    }

    /**
     * 批量删除补数记录
     * 
     * @param ids 需要删除的补数记录主键
     * @return 结果
     */
    @Override
    public int deleteOmsComplementRecordByIds(Long[] ids)
    {
        return omsComplementRecordMapper.deleteOmsComplementRecordByIds(ids);
    }

    /**
     * 删除补数记录信息
     * 
     * @param id 补数记录主键
     * @return 结果
     */
    @Override
    public int deleteOmsComplementRecordById(Long id)
    {
        return omsComplementRecordMapper.deleteOmsComplementRecordById(id);
    }
}
